//
//  UIImage+SLCreateGradientImage.h
//  shunlianPower2
//
//  Created by 陈镇 on 2020/6/28.
//  Copyright © 2020 顺联网络. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIImage (SLCreateGradientImage)

//渐变色的背景图
+(UIImage *)sl_createHorizontalImageSize:(CGSize)size startColor:(UIColor *)startColor endColor:(UIColor *)endColor cornerRadius:(CGFloat)cornerRadius;

+(UIImage *)sl_createVerticalImageSize:(CGSize)size startColor:(UIColor *)startColor endColor:(UIColor *)endColor cornerRadius:(CGFloat)cornerRadius;

+(UIImage *)sl_createImageSize:(CGSize)size startPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint startColor:(UIColor *)startColor endColor:(UIColor *)endColor cornerRadius:(CGFloat)cornerRadius;

//将图片改变到屏幕宽度-保持不变形
-(UIImage *)sl_imageResizedInLimitedToWidth:(CGFloat)width;
//将图片改变到屏幕宽度-保持不变形
-(UIImage *)sl_imageResizedInLimitedToScreenWidth;

//edgeInsets - left top bottom right 都是小于1的值
-(UIImage *)sl_resizableImageWithCapInsets:(UIEdgeInsets)edgeInsets;

// 先将图片改变到屏幕的宽度，再进行拉伸处理
- (UIImage *)sl_resizedInLimitedToScreenWidthAndResizableImageWithCapInsets:(UIEdgeInsets)edgeInsets;

@end

NS_ASSUME_NONNULL_END
